# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年10月14日
"""
import pandas as pd

path = '../数据文件/课件027/分组.xlsx'

data = pd.read_excel(path)
# data2 = data.groupby(data.index % 2 ==0)[['语文', '数学', '英语']].sum()
# data2 = data.groupby(data.index >= 5)[['语文', '数学', '英语']].sum()
# data2 = data.groupby(data.姓名.str[0])[['语文', '数学', '英语']].sum()
# data2 = data.groupby([data.姓名.str[0], data.姓名.str[1]])[['语文', '数学', '英语']].sum()
# data2 = data.groupby(data.班级.isin(['1班','2班']))[['语文', '数学', '英语']].sum()
data2 = data.groupby(~data.班级.isin(['1班','2班']))[['语文', '数学', '英语']].sum()



# print(data)
print(data2)